package com.demo.dto;

public class QueryCondition {

	private String key ="";
	public static final String EQUAL = " = ";
	public static final String NOT_EQUAL = " <> ";
	public static final String LESS_THAN = " < ";
	public static final String LESS_EQUAL = " <= ";
	public static final String GREATER_EQUAL = " >= ";
	//错别字，greater_than 不是 greater_then
	public static final String GREATER_THAN = " > ";
	public static final String NOT_NULL = " is not null ";
	public static final String IN = " in ";
	public static final String NOT_IN = " not in ";
	public static final String LIKE = " like ";
	public static final String LEFT_LIKE = "left like ";
	public static final String RIGHT_LIKE = "right like ";
	
	private String op = "";
	private Object value ;
	public QueryCondition(String key, String op, Object value) {
		super();
		this.key = key;
		this.op = op;
		this.value = value;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getOp() {
		return op;
	}
	public void setOp(String op) {
		this.op = op;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}
	@Override
	public String toString() {
		return "QueryCondition [key=" + key + ", op=" + op + ", value=" + value
				+ "]";
	}
}
